package zhx;

/**
 * @author Yancy
 * @program springioctest
 * @create 2021-03-08
 */
public class Test02 {

  public static void main(String[] args) {
    recursion("",1);
  }

  public static void recursion(String str, int n) {
    if ("".equals(str) && n == 1){
        str = "1";
        n = 1;
    }
    if (n ==1) {
      System.out.println(str);
      n++;
      recursion(str, n);
    } else if (1<n&&n<10){
      System.out.println(str + n);
      str = str + n;
      n++;
      recursion(str, n);
    }
  }
}
